(() => {
  const ws = new WebSocket('ws://127.0.0.1:10086')
  ws.onopen = (evt) => {
    console.log("Connection open ...");
  };
  ws.onmessage = (evt) => {
    console.log("Received Message: " + evt.data);
    if (evt.data === 'reload')
      location.reload()
  };

  ws.onclose = () => { 
    
  }
})()